package com.cvit.controller;


import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.cvit.service.LoginService;

@Controller
public class LoginController {

	@Autowired
	LoginService loginService;
	
	/**
	 * @author WYHY
	 * @param managername 用户名 passwoed 密码
	 * */
	@RequestMapping("/login")
	@ResponseBody
	public Map login(@RequestParam(value="managerName")String managerName,@RequestParam(value="password")String password) {
		Map map=new HashMap<>();
		map=loginService.login(managerName, password);
		return map;
	}
	
}
